Handling Events
Handling events from InteropForms is just like handling events exposed by any other Visual Basic 6.0 objects. Simply declare a member variable using the WithEvents keyword.
' Declare the .NET HelloWorldForm
Dim WithEvents hello As HelloWorldForm
Dim WithEvents hello As HelloWorldForm
Then, using the drop-down list add the event handler:
Then add your code:
' Handle the SampleEvent event.
Private Sub hello_SampleEvent(ByVal sampleEventText As String)
MsgBox sampleEventText
End Sub
Private Sub hello_SampleEvent(ByVal sampleEventText As String)
MsgBox sampleEventText
End Sub